CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

if (MSVC)
else()
	add_compile_options(-std=c++11)
endif()

include_directories(${COMN_DIR}/include)

if((MSVC) AND (MSVC_VERSION LESS 1700))
	include_directories(${THIRD_PARTY}/stdint)
endif()


link_directories(${COMN_DIR}/lib)
link_directories(${PROJECT_ROOT}/lib)

add_definitions(-DMG_ENABLE_HTTP_STREAMING_MULTIPART)

if (MSVC)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244 /wd4018")
endif()

aux_source_directory(. SOURCES)

add_library(http STATIC ${SOURCES})

target_link_libraries(http
	${LIB_PLATFORM}
	debug comnd optimized comn
	)

set_target_properties(http PROPERTIES DEBUG_POSTFIX "d")
set_property(TARGET http PROPERTY POSITION_INDEPENDENT_CODE TRUE)